package chalmers.game.subterranean;

import chalmers.game.subterranean.util.options.Sound;
import javafx.application.Application;
import javafx.stage.Stage;

/**
 * This class only starts the Factory the Factory class is the initiator for everything.
 * 
 * @author TH
 */
public class Main extends Application {

  /**
   * This method is the default start method for JavaFX JavaFX ignores main if this is correct.
   * 
   * @param stage
   * @throws Exception
   */
  @Override
  @SuppressWarnings("unused")
  public void start(Stage stage) throws Exception {
    new Sound();
    Factory mainApp = Factory.getInstance(stage);

    mainApp.MakeModel();
    mainApp.MakeUI();
    mainApp.initApp();
  }

  /**
   * The main() method is ignored in correctly deployed JavaFX application. main() serves only as
   * fallback in case the application can not be launched through deployment artifacts, e.g., in
   * IDEs with limited FX support. NetBeans ignores main().
   * 
   * @param args the command line arguments
   */
  public static void main(String[] args) {
    launch(args);
  }

}
